package com.mapforge.gui.frames;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import com.mapforge.collection.WeakReferenceInstanceProvider;

public class AboutApplicationDialogProvider extends
		WeakReferenceInstanceProvider<AboutApplicationDialog> implements
		ActionListener {
	private JFrame parent;

	public AboutApplicationDialogProvider(JFrame parent) {
		this.parent = parent;
	}

	@Override
	protected AboutApplicationDialog createNewInstance() {
		return new AboutApplicationDialog(parent);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		this.getInstance().setVisible(true);
	}
}